import request from '@/utils/request'

export function ProductList(params) {
  return request({
    url: `/ProductInfo/PartManager/Renew`,
    method: 'get',
    params,
  })
}

export function ProductInfo(data) {
  return request({
    url: '/ProductInfo/PartManager/PartNewly/',
    method: 'post',
    data,
  })
}

export function ProductInfoDelete(data) {
  return request({
    url: `/ProductInfo/PartManager/ProductInfo/ProductId=${data.ProductId}`,
    method: 'delete',
    data,
  })
}

export function ProductionIdsList(params) {
  return request({
    url: `/ProductInfo/PartTechnology/ProductionIds/Index=${params.Index}&Count=${params.Count}`,
    method: 'get',
    params,
  })
}

export function ProductionInfo(params) {
  return request({
    url: `/ProductInfo/PartTechnology/ProductionInfo/ProductId=${params.ProductId}`,
    method: 'get',
    params,
  })
}

export function ProductAllOp(params) {
  return request({
    url: `/ProductInfo/PartTechnology/ProductionId/ProductAllOp/ProductId=${params.ProductId}`,
    method: 'get',
    params,
  })
}

export function NCList(params) {
  return request({
    url: `/ProductInfo/NCManager/NC/Index=${params.Index}&Count=${params.Count}`,
    method: 'get',
    params,
  })
}

export function HistoryProcesInfo(params) {
  return request({
    url: `/ProductInfo/NCManager/NC/HistoryProcesInfo/NCId=${params.NCId}&VersionId=${params.VersionId}`,
    method: 'get',
    params,
  })
}

export function NCGet(data) {
  return request({
    url: `/ProductInfo/NCManager/NC/HistoryProces/NCId=${data.NCId}`,
    method: 'get',
    data,
  })
}

export function NCDelete(data) {
  return request({
    url: `/ProductInfo/NCManager/NC/NCId=${data.NCId}`,
    method: 'delete',
    data,
  })
}

export function NCRelease(data) {
  return request({
    url: '/ProductInfo/NCManager/NC/NCRelease/',
    method: 'post',
    data,
  })
}

export function NCInfo(data) {
  return request({
    url: '/ProductInfo/NCManager/NC/NCNewly/',
    method: 'post',
    data,
  })
}

export function NCVersionFiles(data) {
  return request({
    url: `/ProductInfo/NCManager/NC/NCVersionFile/NCId=${data.NCId}&VersionId=${data.VersionId}`,
    method: 'get',
    data,
  })
}

export function NCInfos(data) {
  return request({
    url: '/ProductInfo/NCManager/NC/Renew',
    method: 'post',
    data,
  })
}

export function HistoryProces(data) {
  return request({
    url: `/ProductInfo/NCManager/NC/HistoryProces/NCId=${data.NCId}`,
    method: 'get',
    data,
  })
}

export function BomManagerList(params) {
  return request({
    url: `/ProductInfo/BomManager/PartInfo/Index=${params.Index}&Count=${params.Count}`,
    method: 'get',
    params,
  })
}

export function BomOPNewly(data) {
  return request({
    url: `/Productinfo/BomManager/OPNewly/Predata`,
    method: 'post',
    data,
  })
}

export function Predata(params) {
  return request({
    url: `/Productinfo/BomManager/OPNewly/Predata`,
    method: 'get',
    params,
  })
}

export function DeviceInfo(params) {
  return request({
    url: `/ProductInfo/NCManager/NC/NCNewly/GetDeviceModel`,
    method: 'get',
    params,
  })
}

export function NCVersionFile(data) {
  return request({
    url: `/ProductInfo/NCManager/NC/NCVersionFile/`,
    method: 'post',
    data,
  })
}

export function ProductLists(params) {
  return request({
    url: `/ProductInfo/PartManager/Product/Index=${params.Index}&Count=${params.Count}&MatchString=${params.MatchString}`,
    method: 'get',
    params,
  })
}

export function BomManagerInfo(params) {
  return request({
    url: `/ProductInfo/PartManager/BomManager/ProductId=${params.ProductId}`,
    method: 'get',
    params,
  })
}

export function HistoryProcessLog(params) {
  return request({
    url: `/ProductInfo/PartManager/ProductInfo/HistoryProcessLog/ProductId=${params.ProductId}&Index=${params.Index}&Count=${params.Count}`,
    method: 'get',
    params,
  })
}

export function ProductNewlyOpFrm(data) {
  return request({
    url: `/ProductInfo/PartTechnology/ProductionId/ProductNewlyOpFrm`,
    method: 'post',
    data,
  })
}

export function FlowChart(data) {
  return request({
    url: `/PlanAndProduction/OrderManager/FlowChart/OrderId=${data.OrderId}`,
    method: 'post',
    data,
  })
}

export function NCVersionRollBack(data) {
  return request({
    url: `/ProductInfo/NCManager/NCVersionRollBack/NCId=${data.NCId}&VersionId=${data.VersionId}`,
    method: 'post',
    data,
  })
}

export function BOMDelete(data) {
  return request({
    url: `/ProductInfo/BomManager/Delete/ProductId=${data.ProductId}`,
    method: 'delete',
    data,
  })
}

export function BOMGet(params) {
  return request({
    url: `/ProductInfo/BomManager/BomList/ProductId=${params.ProductId}`,
    method: 'get',
    params,
  })
}

export function ProductAllOpDelete(data) {
  return request({
    url: `/ProductInfo/PartTechnology/ProductionId/ProductAllOp/ProductId=${data.ProductId}&OpId=${data.OpId}`,
    method: 'delete',
    data,
  })
}

export function OpCard(data) {
  return request({
    url: `/ProductInfo/PartTechnology/ProductionId/OpCard/`,
    method: 'post',
    data,
  })
}

export function FloBomListChart(params) {
  return request({
    url: `/ProductInfo/PartTechnology/ProductionId/OpCard/OpId=${params.OpId}&ProductId=${params.ProductId}`,
    method: 'get',
    params,
  })
}
export function SendNcDeviceList(params) {
  return request({
    url: `/ProductInfo/NCManager/NC/SendNcDeviceList/NcId=${params.NcId}`,
    method: 'get',
    params,
  })
}

export function SendNcToDevice(data) {
  return request({
    url: `/ProductInfo/NCManager/NC/SendNcToDevice/NcId=${data.NcId}&Version=${data.Version}&DeviceId=${data.DeviceId}`,
    method: 'post',
    data,
  })
}
export function OpCard1(params) {
  return request({
    url: `/ProductInfo/PartTechnology/ProductionId/OpCard/OpId=${params.OpId}&ProductId=${params.ProductId}`,
    method: 'get',
    params,
  })
}

export function GetAllMachine(params) {
  return request({
    url: `/ProductInfo/PartTechnology/ProductionId/GetAllMachine/`,
    method: 'get',
    params,
  })
}

export function BomManagerNewly(data) {
  return request({
    url: `/ProductInfo/BomManager/Newly/`,
    method: 'post',
    data,
  })
}

export function BomManagerRenew(data) {
  return request({
    url: `/ProductInfo/BomManager/Renew/`,
    method: 'post',
    data,
  })
}
